package com.minimalist.common.entity.basic.vo.dict;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @author 11987
 */
@Schema(name = "字典基础信息实体")
public class DictInfoVO implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    @NotBlank(message = "字典类型不能为空")
    @Schema(name = "dictType", description = "字典类型", type = "string")
    private String dictType;

    @NotBlank(message = "字典名称不能为空")
    @Schema(name = "dictName", description = "字典名称", type = "string")
    private String dictName;

    @NotBlank(message = "字典描述不能为空")
    @Schema(name = "dictDesc", description = "字典描述", type = "string")
    private String dictDesc;

    @NotEmpty(message = "字典数据不能为空")
    @Schema(name = "dictDataList", description = "字典数据列表", type = "array")
    private List<DictDataVO> dictDataList;

    public String getDictType() {
        return dictType;
    }

    public void setDictType(String dictType) {
        this.dictType = dictType;
    }

    public String getDictName() {
        return dictName;
    }

    public void setDictName(String dictName) {
        this.dictName = dictName;
    }

    public String getDictDesc() {
        return dictDesc;
    }

    public void setDictDesc(String dictDesc) {
        this.dictDesc = dictDesc;
    }

    public List<DictDataVO> getDictDataList() {
        return dictDataList;
    }

    public void setDictDataList(List<DictDataVO> dictDataList) {
        this.dictDataList = dictDataList;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DictInfoVO that = (DictInfoVO) o;
        return java.util.Objects.equals(dictType, that.dictType) &&
               java.util.Objects.equals(dictName, that.dictName) &&
               java.util.Objects.equals(dictDesc, that.dictDesc) &&
               java.util.Objects.equals(dictDataList, that.dictDataList);
    }

    @Override
    public int hashCode() {
        return java.util.Objects.hash(dictType, dictName, dictDesc, dictDataList);
    }

    @Override
    public String toString() {
        return "DictInfoVO{" +
               "dictType='" + dictType + '\'' +
               ", dictName='" + dictName + '\'' +
               ", dictDesc='" + dictDesc + '\'' +
               ", dictDataList=" + dictDataList +
               '}';
    }

}
